home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Text Processing / FL Package / FL Doc(Text) < prev    next >
Text File  |  1994-04-15  |  16KB  |  372 lines

  1.  
  2.             FL Package of BBEdit Extensions
  3.  
  4. The FL Package contains four Extensions
  5.  
  6.     • Function Lister
  7.     • Fast Search
  8.     • Word Completion
  9.     • Function Lookup
  10.  
  11. Function Lister is a utility for programmers which displays information about functions 
  12. defined in a source file;
  13. Fast Search is an alternative to BBEdit’s regular search, a fast incremental search which 
  14. finds as the user types characters;
  15. Word Completion enables the user to type a few letters of a variable name and have the 
  16. extension type the rest;
  17. Function Lookup is a convenient method of accessing Think Reference or MPW’s 411.
  18.  
  19.  
  20. Because Function Lookup requires the “Insert ToolBox Template” command of BBEdit,
  21. it is the only extension of the package that is not usable with BBEdit Lite. 
  22. All four extensions work with BBEdit 2.5.
  23.  
  24. BBEdit 2.5 allows the assignment of cmd keys to extensions, and the four FL
  25. extensions come prebound to cmd-F11, cmd-F9,  cmd-F12 and  cmd-F10 respectively.
  26. For BBEdit Lite, I highly recommend the BBEdit extension  BBXKeys, written by
  27. Jamie McCarthy, available at the usual sites.
  28.  
  29. The FL Package is distributed as ShareWare, and is Copyright © 1993, 1994 , Paul van 
  30. Mulbregt,  All rights reserved.
  31. If,  after trying these extensions for 30 days, you decide to continue using
  32. them, you should register your copy by sending $15 to
  33. Paul van Mulbregt, 33 Pine Ridge Road, Wayland, MA 01778, USA.
  34. A registration form is included as the last page of this documentation.  Site licenses are 
  35. available. Registered Users receive automatic updates (via email)
  36.  
  37. Questions or Comments are best sent via email to:
  38. Internet : paulvm@dragonsys.com
  39.  
  40. The FL Package may be distributed freely, provided that the software, including
  41. this documentation, is unchanged. The  FL Package may not be sold or offered for
  42. sale, or included with another software product offered for sale, except with
  43. the express written permission of the author.  Companies that distribute public
  44. domain/freeware/shareware software for profit should contact me.  This
  45. restriction does not apply to bulletin boards, commercial on-line services such
  46. as America Online, CompuServe and GEnie, and non-profit Macintosh user groups
  47. which hold regularly scheduled public meetings.
  48.  
  49. Legalities: The FL Package is distributed as is, with no guarantee that it is
  50. bug free or compatible with all hardware and software configurations.  The
  51. author is not responsible for losses incurred through the uses or malfunction of
  52. this program.
  53.  
  54. Function Lister 
  55.  
  56. Function Lister displays information about functions defined in C, C++ and Pascal
  57. files, and information about resources in Rez files.
  58. For C and C++ files, the functions, structs and typedefs are displayed by
  59. Function Lister, as well as any #include files, #defines and #pragmas.
  60. For Rez files, the resources, data entries, #defines, #includes, include’s and
  61. types are displayed.
  62. For Pascal files, the functions and procedures, consts, types, compiler
  63. directives, units used are displayed.
  64.  
  65. For example, opening <console.c> from Symantec’s Standard C Libraries and
  66. choosing the Function Lister BBXT brings up a movable modal dialog box with a
  67. list of the functions defined in <console.c>.
  68.  
  69.  
  70.                                                                  
  71.  
  72.  
  73. To view the definition of a function, click once on the function name in the
  74. list.  The file automatically scrolls to that function and highlights its name
  75. and argument list.  Highlighting appears as a box drawn around the function, in
  76. the current highlighting colour. The file scrolls so that the selected function
  77. appears as the third line from the top of the window.  (One exception to this
  78. rule occurs if the function is in the last page of the file — then BBEdit will
  79. not scroll the file all the way.)
  80.  
  81. To dismiss the dialog, click on the Cancel button, which leaves the file exactly
  82. as it was before the extension ran; or click on the OK button, which scrolls the
  83. file to that function, and leaves the selection point at the start of the
  84. function definition. Double-clicking on a function in the list accomplishes the
  85. same as single-clicking and choosing OK.
  86.  
  87.  
  88. The arrow keys also navigate the list, as do PageUp, PageDown, Home and End. 
  89. The arrow keys change the selected item in the list, while PageUp, PageDown etc.
  90. scroll the list but leave the currently selected item unchanged.
  91.  
  92. To see the other items of interest in a C source file, click on one of the radio
  93. buttons.
  94.  
  95. Radio Button         Cmd-Key equivalent    Displays
  96.  
  97. functions                  F                functions
  98. struct                    S                structs
  99. typedef                    T                typedefs
  100. #include                I                #includes
  101. #define                    D                #defines, #undefs
  102. #pragma                    P                #pragma’s
  103.                         A                About Box
  104.  
  105. Cmd-A will display the About Box for Function Lister.  Any of the above Command
  106. key combinations will hide the About Item and return to displaying information.
  107.  
  108. All information above about scrolling, selecting for the functions list is also
  109. true for all the other lists, with one exception. If the dialog is dismissed and
  110. an element of the #include list has been selected, then the include file is
  111. actually opened, just as if the user had selected the text inside the <> or “”
  112. and  chosen “Open Selection” from BBEdit.
  113.  
  114. The dialog box is a movable modal dialog. Hence it can be dragged around the
  115. desktop and placed wherever it is desired.
  116. Windows behind the dialog can be moved by holding down the Command key and
  117. dragging the window by its title bar.
  118.  
  119. For a C++ source file (ending in .cpp, .cp or .cxx), the extra constructs of C++
  120. are considered as well.  Classes appear together with the structs.  Header files
  121. with extension .h are parsed as C++.
  122.  
  123. Rez files are those ending in .r.   Two of the radio buttons in the dialog change
  124. titles — functions becomes resources, and #pragma becomes other.
  125. Resources and data show up in the resources list, while other covers include,
  126. read, change delete etc.  Types appear as structs, and “type xxx as yyy” will
  127. appear in the typedefs list.
  128.  
  129. The file extensions determining the type of file are stored in an  `STRe’
  130. resource.  While there is no way to change these from Function Lister,  a
  131. Resorcerer® Template is provided, so adding or deleting from these file
  132. extensions is possible.
  133.  
  134. If the type of a file cannot be determined by its name, a dialog will appear
  135. asking the user to specify the type of file: C, C+, Pascal or Rez.
  136.  
  137. Location of the Function Lister Dialog Box
  138. The dialog box will be positioned on the same monitor as the frontmost window. 
  139. If there is room above or below or to the side of this window, then that is
  140. where it will be placed.  Otherwise it will be at the bottom of the screen.
  141.  
  142. Known Anomalies:
  143. •    With nested structs or classes, BBEdit’s algorithm for hilighting text in a
  144.     non-active window sometimes leaves some residue on the screen.
  145. •    With a split window, and the selection point in the lower half of the window,
  146.     scrolling doesn’t always occur in some versions of BBEdit.
  147. •    Function Lister is a not a C compiler nor a C preprocessor - nor is that
  148.     desirable.  One    consequence of this is that  by with “unusual” use of macros,
  149.     it is possible to confuse Function Lister.  Unusual here means, for example, 
  150.     a macro which looks like a function but in reality is declaring a struct.  
  151.     Without    having access to all the defines in header files and at the make 
  152.     level (MPW makefile, Think C project etc) it is not possible to exactly 
  153.     determine the nature of the code.  Function Lister does what can be done 
  154.     in the absence of this knowledge, and in the process is able to show all 
  155.     functions and structs, not just those which are being compiled with the 
  156.     current set of #defines.
  157.  
  158. How is it different from PopUpFuncs? 
  159.  
  160. PopUpFuncs from SciComp Software is also a productivity tool.  A demo of
  161. PopUpFuncs is shipped with BBEdit.
  162. PopUpFuncs also displays a list of functions and typedefs in a C file, but it
  163. does so by installing a WDEF in BBEdit itself. This may cause a conflict with
  164. other utilities such as James Walker’s Text Editor Patches.
  165. PopUpFuncs works with MPW and BBEdit, parses Assembly files in addition to C, C++
  166. Pascal and Rez files, and is quick for short files.
  167.  
  168. •    What PopUpFuncs doesn’t do is display information about structs, #includes, 
  169.     #defines, #pragmas.  
  170. •    PopUpFuncs doesn’t parse C++ files correctly. 
  171. •    PopUpFuncs is less robust than Function Lister to code which makes uses of 
  172.     C macros.
  173. •    For long files, Function Lister is faster than PopUpFuncs, and more convenient 
  174.     to use than a very long drop-down list of functions.
  175. •    Function Lister enables the user to browse the file,  viewing just the
  176.     interesting functions, without having to traverse a list each time to get to 
  177.     the next function.
  178. •    Function Lister is also cheaper. 
  179.  
  180.  
  181. Fast Search
  182.  
  183. Fast Search is an alternative to the regular BBEdit search.  By restricting the
  184. search to the immediate file, it is possible to search as the letters are typed
  185. in.
  186.  
  187. The Fast Search dialog is a movable modal dialog box and looks like
  188.  
  189.                                                                
  190.  
  191.  
  192. Entering a Search String:
  193. Characters are appended to the Search String as they are typed — they appear in
  194. the “Search for:” item.  After each character is entered the file is searched
  195. for the new string, the search starting at the current location. The file is
  196. then scrolled to display that match as the third line from the top of the file.
  197.  
  198. The line number of a match is displayed.  In the above example, “BBXT” was found
  199. on line 88 of the window.
  200.  
  201. If a match is not found, then the file is scrolled to the end (or beginning,
  202. depending on the search direction).
  203.  
  204. Hitting the backspace key deletes the last letter, and returns to the previous
  205. match of the shorter string.
  206.  
  207. To find the next occurrence of the same search string, just select the Next
  208. button.  For the previous match, select the Previous button.
  209.  
  210. Note that this search string is not an editText item, and cannot be edited in
  211. the usual manner for editText items.
  212.  
  213.  
  214.  
  215. Search Options
  216. Case-sensitivity: 
  217.     It is possible to search case-sensitively or case-insensitively, by 
  218.     appropriately checking the check-box labelled “Match Case”.   The default is
  219.     to match case exactly.
  220. Search Direction:
  221.     The default search direction is forward, although at the start of a search, 
  222.     the “Search Backwards” checkbox is active.  Unless this checkbox is checked,
  223.     typing any characters will initiate a forward search. The “Search Backwards” 
  224.     checkbox may only be checked if there no characters in the search string.  
  225.     It is always possible however, to search in the other direction by using 
  226.     Previous and Next. (Note that Previous and Next refer to the search direction,
  227.     so selecting Previous while searching backwards would actually move forwards 
  228.     in the file.)
  229.  
  230. What do I do now that I’ve found it?
  231. To dismiss the dialog, select the OK button (or hit the return key), and the
  232. dialog will disappear, and the selection point in the file will be that of the
  233. last match. Selecting Cancel (or Cmd-.) will dismiss the dialog and return the
  234. file in its previous state.
  235.  
  236. Location of the Fast Search Dialog Box
  237. The dialog box will be positioned on the same monitor as the frontmost window. 
  238. If there is room above or below or to the side of this window, then that is
  239. where it will be placed.  Otherwise it will be at the bottom of the screen.
  240.  
  241. Known Anomalies:
  242. •    With a split window, and the selection point in the lower half of the window,
  243.     scrolling doesn’t always occur in some versions of BBEdit.
  244.  
  245.  
  246. Word Completion
  247.  
  248. This extension saves typing, as well as making sure variable names are correct. 
  249. While typing the following C code, there is no need to type all of the second
  250. occurrence of verySpecialInt.  One could copy and paste, but another way is to
  251. type a few letters, and select the Word Completion Extension.
  252.  
  253. {
  254.     int verySpecialInt = 10;
  255.     while(verySp                                                    
  256.  
  257.  
  258. becomes
  259.  
  260. {
  261.     int verySpecialInt = 10;
  262.     while(verySpecialInt                                                    
  263.  
  264.                                                     
  265.  
  266. Word Completion will look back in the code to find the first match and then
  267. extend the current occurrence to match the previous occurrence.  If a match is
  268. not found looking backwards, then it looks forwards.  If not found forwards, the
  269. word is selected.  This is a quick way to save on typing, good for helping
  270. prevent RSI, but perhaps more importantly, to make sure that variable names are
  271. spelt correctly.
  272.  
  273. There is no user interface for Word Completion.
  274.  
  275. The usefulness of this extension is greatly enhanced if the extension is bound to
  276. a key!
  277.  
  278.  
  279. Function Lookup
  280.  
  281. Function Lookup allows the user to insert a function name and/or template in a
  282. file without typing the whole name, or remembering the argument list
  283.  
  284. Type a few letters of a function.  Select the Function Lookup extension -- it
  285. will try to match those first few letters against a list of ToolBox traps and
  286. functions from the Standard C library. A dialog box with a list of potential
  287. matches will then be displayed. For example, typing HLock and then selecting
  288. Function Lookup brings up a dialog box and a list with two elements, HLock and
  289. HLockHi, since there are only two ToolBox traps which start HLock.
  290.  
  291.                                           
  292.  
  293. At this stage there are several choices.
  294. If HLock, the highlighted element of the list, is the desired ToolBox call, 
  295. then one can
  296.     1. Paste a template for HLock (Cmd M)
  297.     2. Lookup the entry for HLock (Cmd -)
  298.     3. Cancel, which leaves the file the was it was
  299.     4. OK, which adds () and leaves the selection in the middle of the parentheses
  300.  
  301. All ToolBox Lookups and Template Pastings are done through either MPW 411 or
  302. Think Reference, depending which one the user has chosen in BBEdit. (Hence this
  303. extension requires either Think Reference or 411!)
  304.  
  305. For example, with Think Reference as the selected ToolBox reference, the above
  306. four options leave the text like
  307.  
  308. 1.     HLock(theHandle);   /* IM II pg 41 */    (I-beam cursor at end of line)
  309. 2.     HLock                                    (switched to Think Reference)
  310. 3.     HLock                                    (no change)
  311. 4.     HLock()                                    (I-beam cursor in between ‘(‘ and ‘)’)
  312.  
  313. If, on the other hand, HLock is not the desired ToolBox call, then one can 
  314.     1. scroll through the list to find the correct call; or,
  315.     2. type more letters to narrow down the search; or,
  316.     3. press delete to remove letters and widen the search.
  317.  
  318. HLock is a short name and easy to remember trap and used above as an example
  319. only. The real use of this extension is with traps which have many letters in
  320. common with other traps. For example, there are about 60 AppleEvent calls which
  321. start with the letters AE. Using this extension is a quick way to trim the
  322. search for some AppleEvent call, and find an argument list.
  323.  
  324. All the functions from the C standard libraries are also available.
  325.  
  326. Not all of the functions known about by Function Lookup may be present in the database used 
  327. by 411 or Think Reference. 
  328. (If I missed any out, please let me know!)
  329.  
  330. Lookup and Make Template have the same command key shortcuts as used in BBEdit 2.5
  331.  
  332.  
  333.  
  334. FL Package v1.1 registration form.
  335.  
  336.  
  337. Please complete this form and mail it to:    Paul van Mulbregt
  338.     33 Pine Ridge Road
  339.     Wayland, MA 01778
  340.     U.S.A
  341. My internet address is paulvm@dragonsys.com
  342.  
  343. Date: 
  344.  
  345. Your name: 
  346.  
  347. Your Postal Address:    
  348.     
  349.     
  350.  
  351. E-Mail: 
  352.  
  353. Method of Payment:
  354. (Check  /  Postal Money Order  /  Cash  : )        
  355.  
  356. Number of Copies:
  357. Amount (US$15 - or equivalent ) : 
  358.  
  359.  
  360. Where did you get FL Package v1.0 ? :
  361. Was the documentation accompanying the software ?  : Yes
  362.  
  363. Your Mac is a: (e.g. IIfx, Quadra 650)    
  364.  
  365. Version of System: (e.g. 6.0.5, 7.1 )
  366.  
  367. Would you like to recieve automatic updates or just notification of 
  368. updates? (Automatic, Notification, Neither)
  369.  
  370. Have you any  bugs to report or suggestions? 
  371.  
  372.